<?php
// $Header: /cvsroot/bitweaver/_bit_moderate/admin/admin_moderate_inc.php,v 1.8 2006/03/01 20:16:26 spiderr Exp $
// Copyright (c) 2005 bitweaver Moderate
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.

{
	$formModerateLists = array(
	'General Moderation' => array(
	'moderate_bug_exp' => array(
	'type' => 'text',
	'default' => 'http://trac.example.com/newticket?summary=$summary&description=$description&reporter=$email&keywords=$keyword',
	'label' => "Bug Tracker URL",
	'note' => "",
	),
	),
	'Display Moderation' => array(
	'moderate_ver_min' => array(
	'type' => 'text',
	'default' => 50,
	'label' => "Minimun Revision Rating",
	'note' => "",
	),
	'moderate_min' => array(
	'type' => 'text',
	'default' => 20,
	'label' => "Minimun Rating",
	),
	'moderate_ver_min_c' => array(
	'type' => 'text',
	'default' => 5,
	'label' => "Minimun Revision Rating Count",
	),
	'moderate_min_c' => array(
	'type' => 'text',
	'default' => 12,
	'label' => "Minimun Rating Count",
	),
	'moderate_max_fallback' => array(
	'type' => 'text',
	'default' => 0,
	'label' => "Maximum Fallback",
	),
	),
	'Autohide Moderation' => array(
	'moderate_sql_ver_min' => array(
	'type' => 'text',
	'default' => 40,
	'label' => "Hide Minimun Revision Rating",
	),
	'moderate_sql_min' => array(
	'type' => 'text',
	'default' => 10,
	'label' => "Hide Minimum Rating",
	),
	'moderate_sql_ver_min_c' => array(
	'type' => 'text',
	'default' => 7,
	'label' => "Hide Minimun Revision Rating Count",
	),
	'moderate_sql_min_c' => array(
	'type' => 'text',
	'default' => 15,
	'label' => "Hide Rating Count",
	),
	'moderate_sql_max_fallback' => array(
	'type' => 'text',
	'default' => 0,
	'label' => "Hide Maximum Fallback",
	),
	),
	);
}
foreach ($formModerateLists as $section => $settings) {
	foreach ($settings as $op_id => $op) {
		if (!empty($_REQUEST[$op_id])) {
			if( $op['type'] == 'checkbox' ) {
				simple_set_toggle( $op_id, USERS_PKG_NAME );
			} else {
				simple_set_value( $op_id, USERS_PKG_NAME );
			}
		}
		$value = $gBitSystem->getConfig($op_id, $op['default']);
		$op['value']=$value;
		$formModerateLists[$section][$op_id] = $op;
	}
}

$gBitSmarty->assign_by_ref('formModerateLists',$formModerateLists);

?>
